#include <iostream>
using namespace std;

class Date{
	int Getday(int _month)
	{
		int day[] = { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
		if ((_month == 2) && ((_year % 4 == 0 && _year % 100 != 0) || (_year % 400 == 0)))
			return 29;
		return day[_month];
	}
	Date* operator+(int day)
	{
		_day += day;
		while (_day>Getday(_month))
		{
			_day -= Getday(_month);
			_month++;
			if (_month == 13)
			{
				_year++;
				_month = 1;
			}
		}
		return *this;
	}
	void printf()
	{
		cout << _year << _month << _day << endl;
	}
public:
	Date(int _year = 0, int _month = 0, int _day = 0)
		:_year(year), _month(month), _day(day)
	{}
private:
	int _year;
	int _month;
	int _day;
}
int main()
{
	Date d1(2020, 1, 1);
	Date d2 = d1 + 20;
	d2.printf();
	return 0;
}